#ifndef __TLB_H__
#define __TLB_H__

#include "common.h"

#define TLB_SIZE 64

typedef struct {
    bool valid; //valid bit
    uint32_t tag; //visual page's num (vpn)
    uint32_t data; //physical page's num (ppn)
}TLB;

TLB tlb[TLB_SIZE];

void init_tlb();
int read_tlb(lnaddr_t addr);
void write_tlb(lnaddr_t addr, hwaddr_t hwaddr);

#endif